﻿Imports DAO
Public Class BusHanghoa
    Public Shared Function Them(ByVal tenH As String, ByVal qcach As String, ByVal gia As Double, ByVal slton As Integer) As String
        Dim err As String = String.Empty
        Dim obj As New ThuVien
        Dim ma As String = obj.auto_sMaHangH6oa()
        err = DaoHanghoa.Them(ma, tenH, qcach, gia, slton)
        If (err <> String.Empty) Then
            'xu li loi day loi len GUI
        End If
        Return err
    End Function
    Public Shared Function Lay() As DataTable
        Dim bang As DataTable = Nothing
        bang = DaoHanghoa.Lay()
        Return bang
    End Function
    Public Shared Function Xoa(ByVal ma As String) As String
        Dim err As String = String.Empty
        err = DaoHanghoa.Xoa(ma)
        If (err <> String.Empty) Then
            'xuli loi
        End If
        Return err

    End Function
    Public Shared Function Capnhat(ByVal ma As String, ByVal ten As String, ByVal qc As String, ByVal gia As Double, ByVal soluong As Integer) As String
        Dim err As String = String.Empty
        err = DAO.DaoHanghoa.Capnhat(ma, ten, qc, gia, soluong)
        If err <> String.Empty Then

        End If
        Return err
    End Function
End Class
